local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)

local curse = createConditionObject(CONDITION_CURSED)
setConditionParam(curse, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(curse, 3, 4000, -1)
addDamageCondition(curse, 3, 4000, -2)
addDamageCondition(curse, 1, 4000, -3)
addDamageCondition(curse, 2, 4000, -4)
addDamageCondition(curse, 1, 4000, -5)
addDamageCondition(curse, 1, 4000, -6)
addDamageCondition(curse, 1, 4000, -7)
addDamageCondition(curse, 1, 4000, -9)
addDamageCondition(curse, 1, 4000, -11)
addDamageCondition(curse, 1, 4000, -13)
addDamageCondition(curse, 1, 4000, -15)
addDamageCondition(curse, 1, 4000, -18)
addDamageCondition(curse, 1, 4000, -22)
addDamageCondition(curse, 1, 4000, -27)
addDamageCondition(curse, 1, 4000, -32)
addDamageCondition(curse, 1, 4000, -38)
addDamageCondition(curse, 1, 4000, -46)
addDamageCondition(curse, 1, 4000, -55)
addDamageCondition(curse, 1, 4000, -66)
addDamageCondition(curse, 1, 4000, -79)
addDamageCondition(curse, 1, 4000, -95)
addDamageCondition(curse, 1, 4000, -114)
addDamageCondition(curse, 1, 4000, -137)
addDamageCondition(curse, 1, 4000, -165)
addDamageCondition(curse, 1, 4000, -198)
addDamageCondition(curse, 1, 4000, -238)
addDamageCondition(curse, 1, 4000, -285)
addDamageCondition(curse, 1, 4000, -342)
addDamageCondition(curse, 1, 4000, -342)
setCombatCondition(combat, curse)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end